const Merge = require('webpack-merge');
const CommonConfig = require('./webpack.common.js');
const path = require('path');
module.exports = Merge(CommonConfig, {
	devtool: 'source-map ',
	 // entry: [
	 //   'webpack-dev-server/client?http://127.0.0.1:' + 8080+'/dist',
	 //   'webpack/hot/only-dev-server',
	 //   path.join(__dirname,'../src/index.js')
	 // ],
	devServer: {
      contentBase: path.join(__dirname, "dist"),
      compress: true,
      historyApiFallback: true,
      inline: true,
      proxy: {
            "/api/*": {
                target: 'http://localhost:80',
                //pathRewrite: {'^/api' : '/advanced/api/web/v1'},
                changeOrigin: true
            }
        }
    },
});